home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_STCC.ZIP / Sega Touring Car.txt < prev    next >
Text File  |  1998-05-04  |  17KB  |  336 lines

  1.  
  2. Free Information Xchange '98 presents:
  3.  
  4. SEGA Touring Car Championship - CD crack by Static Vengeance
  5.  
  6. Requirements:
  7. hex editor and full install
  8.  
  9.     Being a big fan of racing games I have yet another cracking tutorial for a Sega game.  Sega Touring
  10. Car Champoinship is somewhat like Sega Rally Championship in that it has the same types of problems like:
  11. it needs a Direct3D patch to take advantage of 3D hardware like a Voodoo based card or a PowerVR card.
  12. This would add far more realism and increase the frame rates making either game that much more entertaining
  13. to play.  Touring Car Championship also shares a common problem with all Sega games, and that is the CD check
  14. that occurs when you run the game.  This "bug" needs to be FiX'ed! So it's time to load up W32Dasm and
  15. disassemble the file stcc.exe so we can FiX that minor bug.
  16.  
  17. NOTE:  Sega has released a Direct3D patch for the SEGA Touring Car Championship!
  18.  
  19.     I'm sure you're getting tired of hearing it, but it works like a charm... so here it goes: Using my
  20. favorite method: Go up to the menu bar and select "Refs" and then select "String data references" from the
  21. drop down menu.  From there, grab the slider bar and scroll down checking for strings like "Insert..." or
  22. "Please insert.." and eventually you'll see "Please insert The SEGA Touring Car Championship CD." double
  23. clicking on this string will put you in the middle of the routine that checks for the CD.  That routine looks
  24. like this:
  25.  
  26. * Referenced by a CALL at Addresses:
  27. |:0040B3A2   , :00436294                                           <-- Where the check is called from
  28. |
  29. :00438640 E8BBFEFFFF              call 00438500                    <-- Check for the CD
  30. :00438645 83F8FF                  cmp eax, FFFFFFFF                <-- What was the result of CD check
  31. :00438648 A338735600              mov dword ptr [00567338], eax
  32. :0043864D 7528                    jne 00438677                     <-- Take this jump for passed CD check
  33.  
  34. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  35. |:00438675(C)
  36. |
  37. :0043864F 6A35                    push 00000035
  38.  
  39. * Possible StringData Ref from Data Obj ->"SEGA Touring Car Championship "
  40.                                         ->"for PC"
  41.                                   |
  42. :00438651 68947F4B00              push 004B7F94
  43.  
  44. * Possible StringData Ref from Data Obj ->"Please insert The SEGA Touring "  <-- Ask for the CD
  45.                                         ->"Car Championship CD."
  46.                                   |
  47. :00438656 68607F4B00              push 004B7F60
  48. :0043865B E880FDFFFF              call 004383E0                  <-- Pop dialog box routine
  49. :00438660 83C40C                  add esp, 0000000C
  50. :00438663 83F802                  cmp eax, 00000002              <-- Hit cancel from dialog box
  51. :00438666 7415                    je 0043867D                    <-- Take this jump to fail and quit
  52. :00438668 E893FEFFFF              call 00438500                  <-- Check for the CD again
  53. :0043866D 83F8FF                  cmp eax, FFFFFFFF              <-- Check the result of the CD check
  54. :00438670 A338735600              mov dword ptr [00567338], eax
  55. :00438675 74D8                    je 0043864F
  56.  
  57. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  58. |:0043864D(C)
  59. |
  60. :00438677 B801000000              mov eax, 00000001               <-- Found the CD in the drive
  61. :0043867C C3                      ret
  62.  
  63. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  64. |:00438666(C)
  65. |
  66. :0043867D 33C0                    xor eax, eax                    <-- No CD found, failed the check
  67. :0043867F C3                      ret
  68.  
  69.     Although we have enough information to check out the routines that call the above listed
  70. code, let's look at the code that checks for the CD rom.  Again this will give you an idea of what
  71. the routines that check for CD's look like.  So let's list the code at 438500:
  72.  
  73. * Referenced by a CALL at Addresses:
  74. |:00438640   , :00438668                                          <-- Called twice from the above code section
  75. |
  76. :00438500 81EC08020000            sub esp, 00000208
  77. :00438506 53                      push ebx
  78. :00438507 55                      push ebp
  79. :00438508 56                      push esi
  80. :00438509 57                      push edi
  81.  
  82. * Reference To: KERNEL32.GetLogicalDrives, Ord:00FAh            <-- Common text string to search for
  83.                                   |
  84. :0043850A FF15AC981401            Call dword ptr [011498AC]
  85.  
  86. * Reference To: KERNEL32.lstrcatA, Ord:0292h
  87.                                   |
  88. :00438510 8B1DB0981401            mov ebx, dword ptr [011498B0]
  89.  
  90. * Reference To: KERNEL32._lopen, Ord:028Eh
  91.                                   |
  92. :00438516 8B2D049A1401            mov ebp, dword ptr [01149A04]
  93. :0043851C 33F6                    xor esi, esi                 <-- Zero out times through CD check
  94. :0043851E 89442414                mov dword ptr [esp+14], eax
  95. :00438522 89742410                mov dword ptr [esp+10], esi  <-- Temp storage for number of times we
  96.                                                                <-- tried to read the file off the CD
  97. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  98. |:00438603(C)
  99. |
  100. :00438526 B801000000              mov eax, 00000001
  101. :0043852B 8BCE                    mov ecx, esi
  102. :0043852D D3E0                    shl eax, cl
  103. :0043852F 8B4C2414                mov ecx, dword ptr [esp+14]
  104. :00438533 85C1                    test ecx, eax
  105. :00438535 0F84C0000000            je 004385FB
  106. :0043853B 8D5641                  lea edx, dword ptr [esi+41]
  107. :0043853E 8D842418010000          lea eax, dword ptr [esp+00000118]
  108. :00438545 52                      push edx
  109.  
  110. * Possible StringData Ref from Data Obj ->"%c:\"               <-- Common refs string to double click
  111.                                   |
  112. :00438546 68587F4B00              push 004B7F58
  113. :0043854B 50                      push eax
  114.  
  115. * Reference To: USER32.wsprintfA, Ord:026Fh
  116.                                   |
  117. :0043854C FF154C9C1401            Call dword ptr [01149C4C]
  118. :00438552 83C40C                  add esp, 0000000C
  119. :00438555 8D8C2418010000          lea ecx, dword ptr [esp+00000118]
  120. :0043855C 51                      push ecx
  121.  
  122. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh             <-- Another common text string to search for
  123.                                   |
  124. :0043855D FF15B4981401            Call dword ptr [011498B4]
  125. :00438563 83F805                  cmp eax, 00000005           <-- 05 is the value for a CD-ROM drive
  126. :00438566 0F858F000000            jne 004385FB
  127. :0043856C 8DBC2418010000          lea edi, dword ptr [esp+00000118]
  128. :00438573 83C9FF                  or ecx, FFFFFFFF
  129. :00438576 33C0                    xor eax, eax
  130. :00438578 8D542418                lea edx, dword ptr [esp+18]
  131. :0043857C F2                      repnz
  132. :0043857D AE                      scasb
  133. :0043857E F7D1                    not ecx
  134. :00438580 2BF9                    sub edi, ecx
  135.  
  136. * Possible StringData Ref from Data Obj ->"stcc\stcc.exe"     <-- Check for this file on the CD
  137.                                   |                           <-- includes CD volume (path) name
  138. :00438582 68907E4B00              push 004B7E90
  139. :00438587 8BC1                    mov eax, ecx
  140. :00438589 8BF7                    mov esi, edi
  141. :0043858B 8BFA                    mov edi, edx
  142. :0043858D C1E902                  shr ecx, 02
  143. :00438590 F3                      repz
  144. :00438591 A5                      movsd
  145. :00438592 8BC8                    mov ecx, eax
  146. :00438594 83E103                  and ecx, 00000003
  147. :00438597 F3                      repz
  148. :00438598 A4                      movsb
  149. :00438599 8D4C241C                lea ecx, dword ptr [esp+1C]
  150. :0043859D 51                      push ecx
  151. :0043859E FFD3                    call ebx
  152. :004385A0 8D542418                lea edx, dword ptr [esp+18]
  153. :004385A4 6A00                    push 00000000
  154. :004385A6 52                      push edx
  155. :004385A7 FFD5                    call ebp
  156. :004385A9 83F8FF                  cmp eax, FFFFFFFF
  157. :004385AC 7449                    je 004385F7
  158. :004385AE 50                      push eax
  159.  
  160. * Reference To: KERNEL32._lclose, Ord:028Bh
  161.                                   |
  162. :004385AF FF15009A1401            Call dword ptr [01149A00]
  163. :004385B5 8DBC2418010000          lea edi, dword ptr [esp+00000118]
  164. :004385BC 83C9FF                  or ecx, FFFFFFFF
  165. :004385BF 33C0                    xor eax, eax
  166. :004385C1 8D542418                lea edx, dword ptr [esp+18]
  167. :004385C5 F2                      repnz
  168. :004385C6 AE                      scasb
  169. :004385C7 F7D1                    not ecx
  170. :004385C9 2BF9                    sub edi, ecx
  171.  
  172. * Possible StringData Ref from Data Obj ->"stcc\data\bg\sky.bmp"      <-- Another file on the CD to check
  173.                                   |
  174. :004385CB 68A07E4B00              push 004B7EA0
  175. :004385D0 8BC1                    mov eax, ecx
  176. :004385D2 8BF7                    mov esi, edi
  177. :004385D4 8BFA                    mov edi, edx
  178. :004385D6 C1E902                  shr ecx, 02
  179. :004385D9 F3                      repz
  180. :004385DA A5                      movsd
  181. :004385DB 8BC8                    mov ecx, eax
  182. :004385DD 83E103                  and ecx, 00000003
  183. :004385E0 F3                      repz
  184. :004385E1 A4                      movsb
  185. :004385E2 8D4C241C                lea ecx, dword ptr [esp+1C]
  186. :004385E6 51                      push ecx
  187. :004385E7 FFD3                    call ebx
  188. :004385E9 8D542418                lea edx, dword ptr [esp+18]
  189. :004385ED 6A00                    push 00000000
  190. :004385EF 52                      push edx
  191. :004385F0 FFD5                    call ebp
  192. :004385F2 83F8FF                  cmp eax, FFFFFFFF
  193. :004385F5 7514                    jne 0043860B
  194.  
  195. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  196. |:004385AC(C)
  197. |
  198. :004385F7 8B742410                mov esi, dword ptr [esp+10]  <-- Temp storage of number of tries
  199.  
  200. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  201. |:00438535(C), :00438566(C)
  202. |
  203. :004385FB 46                      inc esi                      <-- Inc number of tries to read the file 
  204. :004385FC 83FE20                  cmp esi, 00000020            <-- Try to read file up to 32 times
  205. :004385FF 89742410                mov dword ptr [esp+10], esi  <-- Update temp storage with total tries
  206. :00438603 0F8C1DFFFFFF            jl 00438526                  <-- Loop back up and try again
  207. :00438609 EB0B                    jmp 00438616                 <-- 32 tries and STILL no CD
  208.  
  209. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  210. |:004385F5(C)
  211. |
  212. :0043860B 50                      push eax
  213.  
  214. * Reference To: KERNEL32._lclose, Ord:028Bh
  215.                                   |
  216. :0043860C FF15009A1401            Call dword ptr [01149A00]
  217. :00438612 8B742410                mov esi, dword ptr [esp+10]
  218.  
  219. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  220. |:00438609(U)
  221. |
  222. :00438616 83FE20                  cmp esi, 00000020           <-- Did we try all 32 times
  223. :00438619 750E                    jne 00438629                <-- Take this jump for a passed CD check
  224. :0043861B 83C8FF                  or eax, FFFFFFFF            <-- Same as mov eax,FFFFFFFF (failed)
  225. :0043861E 5F                      pop edi
  226. :0043861F 5E                      pop esi
  227. :00438620 5D                      pop ebp
  228. :00438621 5B                      pop ebx
  229. :00438622 81C408020000            add esp, 00000208
  230. :00438628 C3                      ret
  231.  
  232.  
  233.  
  234. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  235. |:00438619(C)
  236. |
  237. :00438629 8BC6                    mov eax, esi               <-- Anything but FFFFFFFF means passed check
  238. :0043862B 5F                      pop edi
  239. :0043862C 5E                      pop esi
  240. :0043862D 5D                      pop ebp
  241. :0043862E 5B                      pop ebx
  242. :0043862F 81C408020000            add esp, 00000208
  243. :00438635 C3                      ret
  244.  
  245.     That was the actual routine that checks for the CD in your CD-ROM drive.  Now, going back to the
  246. first section of code, lets look at the two places (40B3A2 and 436294) that call the CD checking routine.
  247.  
  248. * Referenced by a CALL at Addresses:
  249. |:0041B13D   , :0041F2F9   , :00463D70   
  250. |
  251. :0040B3A0 56                      push esi
  252. :0040B3A1 57                      push edi
  253. :0040B3A2 E899D20200              call 00438640                 <-- Check for the CD
  254. :0040B3A7 85C0                    test eax, eax                 <-- 00 = failed, 01 = passed
  255. :0040B3A9 750A                    jne 0040B3B5                  <-- Take this jump to continue the game
  256. :0040B3AB 6A01                    push 00000001
  257. :0040B3AD E8FE810500              call 004635B0
  258. :0040B3B2 83C404                  add esp, 00000004
  259.  
  260. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  261. |:0040B3A9(C)
  262. |
  263. :0040B3B5 8B442410                mov eax, dword ptr [esp+10]   <-- Continue with the program
  264. :0040B3B9 8B4C240C                mov ecx, dword ptr [esp+0C]
  265. :0040B3BD 50                      push eax
  266. :0040B3BE 51                      push ecx
  267. :0040B3BF E84C000000              call 0040B410
  268.  
  269.     Here, you would want to NOP the call and force the conditional jump to allow the game
  270. to always continue.  That's what we trying to do, right?  Now lets look at the other section
  271. from the caller at 436294:
  272.  
  273. * Possible StringData Ref from Data Obj ->"SEGA"
  274.                                   |
  275. :0043627F 68907D4B00              push 004B7D90
  276. :00436284 8BCE                    mov ecx, esi
  277. :00436286 E890C70500              call 00492A1B
  278.  
  279. * Possible Reference to Dialog: DialogID_009A, CONTROL_ID:0004, "L÷schen"
  280.                                   |
  281. :0043628B 6A04                    push 00000004
  282. :0043628D 8BCE                    mov ecx, esi
  283. :0043628F E82EBF0500              call 004921C2
  284. :00436294 E8A7230000              call 00438640                 <-- Check for the CD
  285. :00436299 85C0                    test eax, eax                 <-- Anything but zero means passed
  286. :0043629B 7513                    jne 004362B0                  <-- Take this jump to continue the game
  287. :0043629D 8B4C2438                mov ecx, dword ptr [esp+38]
  288. :004362A1 64890D00000000          mov dword ptr fs:[00000000], ecx
  289. :004362A8 5F                      pop edi
  290. :004362A9 5E                      pop esi
  291. :004362AA 5D                      pop ebp
  292. :004362AB 5B                      pop ebx
  293. :004362AC 83C434                  add esp, 00000034
  294. :004362AF C3                      ret
  295.  
  296. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  297. |:0043629B(C)
  298. |
  299. :004362B0 E83B020000              call 004364F0                 <-- Continue with the game
  300. :004362B5 85C0                    test eax, eax
  301. :004362B7 7513                    jne 004362CC
  302. :004362B9 8B4C2438                mov ecx, dword ptr [esp+38]
  303. :004362BD 64890D00000000          mov dword ptr fs:[00000000], ecx
  304. :004362C4 5F                      pop edi
  305. :004362C5 5E                      pop esi
  306. :004362C6 5D                      pop ebp
  307. :004362C7 5B                      pop ebx
  308. :004362C8 83C434                  add esp, 00000034
  309. :004362CB C3                      ret
  310.  
  311.     Again, basicly stop the call to the CD checking routine and force the code to continue.  To do
  312. that, chagne the call 00438640 (at 436294) to mov eax, 00000001 (B8 01 00 00 00).  This will overwrite
  313. the actual call to the CD check routine (we don't need to run it if it'll fail!) and also forces the
  314. conditional jump to be taken. This results in working cracked version of Sega Touring Car Championship.
  315.     After taking a second look at the copy protection I thought it would be easier to disable the
  316. call to the CD check at 438640 by overwriting the call (E8 BB FE FF FF) with xor eax, eax and 3 nop's.
  317. This way there is only one edit to made and the same edit in a different location will work for the
  318. original version and the newly released Direct3D patch.  Search your stcc.exe file for this string:
  319. E8 BB FE FF FF 83 F8 FF and when you find it change make the same patch as listed below.  The actual
  320. edits to stcc.exe by version would be:
  321.  
  322. Edit stcc.exe off the CD
  323. ===========================================
  324. Search for: E8 BB FE FF FF (Offset 227,904)
  325. Change to : 31 C0 90 90 90
  326.  
  327. Edit stcc.exe v1.02 D3D patch off the net
  328. ===========================================
  329. Search for: E8 BB FE FF FF (Offset 241,648)
  330. Change to : 31 C0 90 90 90
  331.  
  332.  
  333.     There you have it, yet another Sega racing game FiX'ed
  334.  
  335. Static Vengeance
  336.